<?php

namespace NewMember\View;

require_once("application/view/SwedishDateTimeView.php");

class RegisterMemberView
{

	public function RegisterMemberPage($message, $usernameValue)
	{
		$this->timeView = new \application\view\SwedishDateTimeView();
		$timeString = $this->timeView->getTimeString(time());

		return $html = "
		<h1>rf222ce laboration 3.2</h1>
		<h3>Ej inloggad, Registrera ny medlem</h3>
		<a href='./index.php'>tillbaka</a>
			<form action='' method='post'>
				<fieldset>
					<legend>Login - Välj användarnamn och lösenord</legend>
					<p>$message</p>
					<label for='RegisterUsernameID' > Användarnamn:</label>
					<input type='text' size='20' name='RegisterUsernameID' id='RegisterUsernameID' value='$usernameValue' />

					<label for='RegisterPassword' >Lösenord  :</label>
					<input type='password' size='20' name='RegisterPassword' id='PasswordID' value='' />

					<label for='RegisterPassword' > Repetera Lösenord  :</label>
					<input type='password' size='20' name='RegisterPassword2' id='PasswordID2' value='' />

					<input type='submit' name=''  value='Registrera' />
				</fieldset>
			</form>
			$timeString";


	}



	public function getRegisterUsename()
	{
		if(isset($_POST['RegisterUsernameID']))
		{
			return $_POST['RegisterUsernameID'];
		}
		else
		{
			return "";
		}
	}

	public function getRegisterPassword()
	{
		if(isset($_POST['RegisterPassword']))
		{
			return $_POST['RegisterPassword'];
		}
		else
		{
			return "";
		}
	}

	public function getRegisterPassword2()
	{
		if(isset($_POST['RegisterPassword2']))
		{
			return $_POST['RegisterPassword2'];
		}
		else
		{
			return "";
		}
	}







}























